package cn.johnyu.adapterdemo03;

import android.app.ListActivity;
import android.os.Bundle;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/3/21.
 */
public class TfBoyActivity extends ListActivity {
    private List<TfBoy> data = new ArrayList<TfBoy>();

    private void init() {

        TfBoy b1 = new TfBoy(123, "TTT1", "Content...1", R.drawable.tf1);
        TfBoy b2 = new TfBoy(456, "TTT2", "Content...2", R.drawable.tf2);
        TfBoy b3 = new TfBoy(344, "TTT3", "Content...3", R.drawable.tf3);
        data.add(b1);data.add(b2);data.add(b3);

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        init();
        MyBaseAdapter adapter=new MyBaseAdapter(this,data);
        setListAdapter(adapter);

    }
}
